import {axios} from '@/utils/request'


/**
 * 客户系统列表
 *
 * @author hubo
 * @date 2021-06-23 15:17:11
 */
export function netConsultationList(parameter) {
  return axios({
    url: '/customer/netConsultation/list',
    method: 'post',
    data: parameter
  })
}

//获取咨询项目
export function getConsulationItems(parameter) {
  return axios({
    url: '/customer/netConsultation/tree',
    method: 'get',
    params: parameter
  })
}

//获取客户列表
export function getConsulationList(phone) {
  return axios({
    url: `/customer/customerList/${phone}`,
    method: 'get'
  })
}

//获取客户列表-姓名
export function getConsulationListByName(name) {
  return axios({
    url: `/customer/customerList/name/${name}`,
    method: 'get'
  })
}

//获取客户列表-卡号
export function getConsulationListByCardNo(cardNo) {
  return axios({
    url: `/customer/customerList/cardNo/${cardNo}`,
    method: 'get'
  })
}

//获取客户列表-联系号码
export function getConsulationListByTel(tel) {
  return axios({
    url: `/customer/customerList/tel/${tel}`,
    method: 'get'
  })
}

//获取电网客户信息
export function getCustomerInfo(params) {
  return axios({
    url: `/customer/netConsultation/getInfo`,
    method: 'get',
    params: params
  })
}

//获取客户诉求列表
export function getConsultationAppeal() {
  return axios({
    url: '/customer/netConsultation/appeal/list',
    method: 'get'
  })
}

//获取客户诉求列表-新的-二级联动
export function getClientDemandName() {
  return axios({
    url: '/receive/getClientDemandName',
    method: 'get'
  })
}

export function getFeiyuCustomerList(tel) {
  return axios({
    url: `/customer/netConsultation/feiyuCustomer/${tel}`,
    method: 'get'
  })
}

//新增客户
export function addNetConsultation(parameter) {
  return axios({
    url: '/customer/netConsultation/add',
    method: 'post',
    data: parameter
  })
}

export function addFeiyuCustomer(parameter) {
  return axios({
    url: '/customer/netConsultation/addFeiyuCustomer',
    method: 'post',
    data: parameter
  })
}


//修改客户资料
export function updateNetConsultation(parameter) {
  return axios({
    url: '/customer/netConsultation/update',
    method: 'post',
    data: parameter
  })
}